//           mainwindow.cc
//  Fri Jan  5 14:07:41 2007
//  Copyright  2007  Min Seok Seo
//  <msseo@oasyss.co.kr>

// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public
// License along with main.c; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301,  USA

#include <gtkmm.h>
#include <iostream>
#include "loginwindow.h"
#include "mainwindow.h"
#include "sales.h"

#ifdef ENABLE_NLS
#  include <libintl.h>
#endif


/* For testing propose use the local (not installed) glade file */
/* #define GLADE_FILE PACKAGE_DATA_DIR"./glade/linuxpos.glade" */
/* #define GLADE_FILE "linuxpos.glade" */

using namespace std;

int main (int argc, char *argv[])
{
	Gtk::Main kit(argc, argv);
	
//	MainWindow mainwindow("test", "test"); 
//	kit.run(mainwindow);

	LoginWindow loginwindow;
	
	kit.run(loginwindow);
	if(loginwindow.login_check == true)
	{
		// 업장코드, 유저명 전달.
		MainWindow mainwindow(loginwindow.login_sosok, loginwindow.login_user);
		kit.run(mainwindow);
	}

	return 0;
}
